package com.hzit.manager.api;




import com.hzit.cart.api.domain.Item;
import com.hzit.common.constant.HZitServiceNameConstants;

import com.hzit.manager.api.domain.Content;

import com.hzit.manager.api.factory.RemoteContentFallback;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(value= HZitServiceNameConstants.MANAGER_SERVICE,fallbackFactory = RemoteContentFallback.class)
public interface RemoteManagerService {

	//1. 根据广告分类查询广告列表
	@GetMapping("/content/findContentsByCategoryId/{id}")
	R<List<Content>> findContentsByCategoryId(@PathVariable("id") String id);

	//2. 查询所有的sku商品列表
	@GetMapping("/item/findAll")
	R<List<Item>> findAllItems();

	//3. 根据spu商品id查询spu商品
	@GetMapping("/goods/{id}")
	AjaxResult getInfo(@PathVariable("id") Long id);

	//4. 根据goodsId查询GoodsDesc
	@GetMapping(value = "/desc/{goodsId}")
	AjaxResult getDescInfo(@PathVariable("goodsId") Long goodsId);

	//5. 根据goodsId查询sku商品列表
	@GetMapping("/item/findItems/{goodsId}")
	R<List<Item>> findItemsByGoodsId(@PathVariable("goodsId") Long goodsId);


}
